
package com.insigma.business.qrcode.job.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.job.dao.JobFairDao;
import com.insigma.business.qrcode.job.dto.search.JobFairBSearcher;
import com.insigma.business.qrcode.job.entity.JobFairBO;
import com.insigma.business.qrcode.job.entity.JobFairDO;
import com.insigma.business.qrcode.job.service.JobFairService;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("jobFairService")
public class JobFairServiceImpl implements JobFairService {

    @Autowired(required = false)
    private JobFairDao jobFairDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<JobFairDO> search(final JobFairBSearcher jobFairBSearcher) {
        return jobFairDao.search(jobFairBSearcher);
    }
   
    @Override
    public JobFairDO get(final String id){
        return jobFairDao.get(id);
    }

    
    @Override
    public Integer insert(final JobFairDO jobFairDO){
        jobFairDO.setId(sequenceGenerator.genKey(SequenceNameConstant.JOB_FAIR_ID));
        return jobFairDao.insert(jobFairDO);
    }

    
    @Override
    public Integer update(final JobFairDO jobFairDO){
        return jobFairDao.update(jobFairDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return jobFairDao.delete(id,modifierType,modifierId);
    }

    @Override
    public List<JobFairDO> listAllUnfinishedFairs() {
        return jobFairDao.listAllUnfinishedFairs();
    }

    @Override
    public List<JobFairBO> searchCompanyOfFair(JobFairBSearcher jobFairBSearcher) {
        return jobFairDao.searchCompanyOfFair(jobFairBSearcher);
    }

    @Override
    public JobFairDO getByQr(String qrString) {
        return jobFairDao.getByQr(qrString);
    }

}
